package com.fin.zw.intelligentbot.entity;

import com.fin.zw.intelligentbot.enums.Status;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.Table;

import javax.persistence.*;
import java.util.Date;

@Data
@Table(appliesTo = "strategy_info", comment = "策略信息")
@Entity
public class StrategyInfo extends BaseEntity {

    @Column(columnDefinition = "varchar(100) COMMENT '策略名称'")
    private String name;

    @Column(columnDefinition = "text comment '客户分类ids'")
    private String categoryIds;

    @Column(columnDefinition = "varchar(20) COMMENT '状态'")
    @Enumerated(EnumType.STRING)
    private Status status;

    @Column(columnDefinition = "int(11) COMMENT '回收次数'")
    private Integer recycleCount;

    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "company_id", columnDefinition = "varchar(64) COMMENT '企业id'")
    private Company company;

    @ApiModelProperty(notes = "创建时间")
    private Date createTime;
}
